<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
 * Aboutus controller
 * @author		Jade Xia
 * @copyright	Copyright (c) 2010 - 2011 天夏网络.
 * @link		http://www.tianxianet.com
 */
class Aboutus extends Controller
{
	var $site_title;
	var $floatim = '';
	
	function Aboutus()
	{
		parent::Controller();
		$this->load->database();
		$this->load->model('com_model');
		$this->site_title=$this->config->item('sys_site_title');
		if($this->config->item('sys_is_open_im') == '1')
		{
			$this->floatim = $this->com_model->floatim();
		}
		if ($this->config->item('sys_cache_time') > 0) $this->output->cache($this->config->item('sys_cache_time'));
	}
	
	function index($q_id='')
	{
		if( ! $q_id) $q_id = 'aboutus';
		$query = $this->com_model->get_article($q_id);
		if ( ! $query) echo_msg('<li>ID参数有误</li>');
		$nav = $query->title;
		$data = array(
			'site_title'		=> $nav.'--'.$this->site_title,
			'nav'		=> ' &gt; '.$nav,
			'nav_title'		=> $nav,
			'aboutus'  => $query,
			'product_catalog'	=> $this->com_model->parse_pcatalog(0)
		);
		$this->load->view(TPL_FOLDER.'aboutus',$data);
	}
}
?>